import config from '@/utils/config'
import { generateRequest } from '@/utils/request'
const { apiUrlPrefix } = config

/** 获取配置信息 */
export const getUploadKeysApi = generateRequest(`${apiUrlPrefix}/systemVariable/getConfig`)

/**
 * 登录
 * @param {string} username 用户名/手机号
 * @param {string} password 密码
 * @param {string} mode 来源，default-pc端 | ding-钉钉
 */
export const loginApi = generateRequest(`${apiUrlPrefix}/login`)

/** 查询所有系统 */
export const systemModuleGetAllApi = generateRequest(`${apiUrlPrefix}/systemModule/getAll`)

/** 获取钉钉配置信息参数（当前机构） */
export const getDingConfigApi = generateRequest(`${apiUrlPrefix}/dingtalk/getConfigurations`)

/** 查询机构菜单 */
export const orgMenusQueryByCurrentUserApi = generateRequest(`${apiUrlPrefix}/organization/menus/queryByCurrentUser`)

/** 根据类型获取当前机构入口 */
export const getEntrancesListByTypeApi = generateRequest(
  `${apiUrlPrefix}/organization/entrances/getEntrancesListByType`,
)

/** 系统功能-功能列表 */
export const systemFeaturePageListApi = generateRequest(`${apiUrlPrefix}/systemFeature/pageList`)

/** 机构管理-机构列表 */
export const orgPageListApi = generateRequest(`${apiUrlPrefix}/organization/pageList`)

/** 机构管理-启用停用 */
export const orgDisabledApi = generateRequest(`${apiUrlPrefix}/organization/disabled`)

/** 机构管理-修改密码 */
export const orgUpdatePasswordApi = generateRequest(`${apiUrlPrefix}/organization/updatePassword`)

/** 机构管理-获取机构详情 */
export const orgGetDetailApi = generateRequest(`${apiUrlPrefix}/organization/getByOrganizationId`)
